<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="sql_rt" uri="http://java.sun.com/jstl/sql_rt" %>
<%@ page session="false" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
    <title></title>
</head>
<body>

<c:if test="${!empty user}">
    <c:url var="editUserUrl" value="/users/edit/${user.id}.html" />
    <c:url var="deleteUserUrl" value="/users/delete/${user.id}.html" />
    <table>
        <tr>
            <th>Id</th>
            <th>FirstName</th>
            <th>LastName</th>
            <th>Email</th>
            <th>Password</th>
            <th>Contact</th>
            <th>Edit</th>
            <th>Delete</th>
        </tr>
        <tr>
            <td>${user.id}</td>
            <td>${user.firstname}</td>
            <td>${user.lastname}</td>
            <td>${user.email}</td>
            <td>${user.password}</td>
            <td>${user.contact}</td>
            <td><a href="${editUserUrl}">edit user</a></td>
            <td><a href="${deleteUserUrl}">delete user</a></td>
        </tr>
    </table>
</c:if>

<p><a href="<c:url value="/users/list.html"/>">Users List</a></p>
</body>
</html>